<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>axios</title>
</head>

<body>
  <div id="root">
  </div>
  <script src="./js/vue.js"></script>
  <script src="./js/axios.js"></script>
  <script>
    //  全局配置公共的请求url域名 
    axios.defaults.baseURL = 'http://www.开发.com/'
    // 配置公共的请求头
    axios.defaults.headers.common['token'] = 'bbb'

    new Vue({
      el: '#root',
      mounted() {

        // 网络请求地址
        // 地址栏显示传参  相对地址
        var url = '/users'
        // post提交数据
        axios.post(url).then(ret => console.log(ret))
      }
    })
  </script>
</body>

</html>